<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache"/>
    <meta http-equiv="expires" content="0"/>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
    <meta http-equiv="description" content="This is my page"/>

    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/base.css"/>
    <link href="${pageContext.request.contextPath}/static/css/daoke.css" rel="stylesheet" type="text/css"/>

    <link href="${pageContext.request.contextPath}/static/css/iconfont.css" rel="stylesheet" type="text/css"/>
    <script language="javascript">
        function del(id) {
            if (confirm('您确定删除吗？')) {
                window.location.href = "${pageContext.request.contextPath}/admin/deleteHospital.html?id=" + id;
            }
        }


        function add() {
            var url = "${pageContext.request.contextPath}/admin/hospital/addHospital.jsp";
            window.location.href = url;
        }
    </script>
</head>

<body leftmargin="8" topmargin="8" >
<table width="99%" border="0" cellpadding="0" cellspacing="0" bgcolor="#D1DDAA">
    <tr bgcolor="#E7E7E7"  style="height: 30px;">
        <td height="14" colspan="14" >
            <i class="iconfont icon-shenbao font16"></i>医院信息管理</a>
        </td>
    </tr>
    <tr align="center" bgcolor="#FAFAF1" height="30">
        <td width="5%" style="font-size: 16px;">序号</td>
        <td width="20%" style="font-size: 16px;">名称</td>
        <td width="20%" style="font-size: 16px;">地址</td>
        <td width="20%" style="font-size: 16px;">电话</td>
        <td width="10%" style="font-size: 16px;">操作</td>
    </tr>
    <c:forEach items="${hospitalAdminList}" var="hosptial" varStatus="status">
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td bgcolor="#FFFFFF" align="center">
                    ${status.index+1}
            </td>
            <td bgcolor="#FFFFFF" align="center">
                    ${hosptial.name}
            </td>
            <td bgcolor="#FFFFFF" align="center">
                    ${hosptial.address}
            </td>
            <td bgcolor="#FFFFFF" align="center">
                    ${hosptial.tel}
            </td>

            <td bgcolor="#FFFFFF" align="center">
                <input type="button" value="删除" onclick="del(${hosptial.id})" style="width: 60px;height: 25px;box-sizing: border-box; border-radius: 5px;"/>
            </td>
        </tr>
    </c:forEach>
</table>

<br/>
<input type="button" value="添加医院" style="width: 120px;height: 30px;box-sizing: border-box; border-radius: 5px;font-size: 16px;" onclick="add()"/>
</body>
</html>
